"""
Client端
"""

import socket


def run_client():
    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    client.connect(("127.0.0.1", 8090))
    client.send("python".encode("utf8"))

    # 获取从服务端发送的数据
    data = client.recv(1024)

    print(data.decode("utf8"))

    client.close()


if __name__ == '__main__':
    run_client()
